/*
 * @(#)Chat.java
 *
 * Copyright (c) 2024 NTTDATA Corporation.
 */

package com.matt.docpro.model;

import cn.hutool.core.date.DateUtil;
import lombok.Data;

import java.util.Date;

/**
 * Chat
 * Created by jiachun.lu on 2024/03/05.
 */
@Data
public class Chat {
    String userId;
    String userNm;
    String userIcon;
    String latestMsg;
    Date time;
    int unreadCount;

    public String getFormatTime() {
        if (time == null) {
            return "";
        }
        return DateUtil.format(time, "yyyy/MM/dd HH:mm");
    }
}
